<?php if (! defined('BASEPATH')) exit('No direct script access allowed'); 

if (!function_exists('getImageUrl')) {
	function getImageUrl($ident, $showDefImage=TRUE, $defImage='/img/spec_def.gif') {
		if(empty($ident)){
			if($showDefImage){
				return $defImage;
			}else{
				return '';	
			}
		}
		
		$CI =& get_instance();
		$CI->config->load('config');
        $imageBaseUrl = $CI->config->item('image_base_url');
        
		return $imageBaseUrl . $ident;
	}
}